const axios = require('axios')
const DATA = require('./data.json')

module.exports = (url, data) => {
  // console.log('axios_url',url)
    return new Promise((resolve, reject) => {
       axios.post(url,Object.assign(DATA,data))
        .then((res) => {
            // console.log('axios_return:',res)
            resolve(res)
        })
        .catch((err) => {
            reject(err);
        });
    })
}